﻿namespace RoslynTest.Analyzers.Sample
{
    /// <summary>
    /// Sample hierarchy with circular references
    /// </summary>
    class Class1 
    {
        public void Method1()
        {
            Method2();
        }

        public void Method2()
        {
            var c = new Class2();
            c.Method4();
        }
    }

    class Class2 
    {
        public void Method3()
        {
            var c = new Class1();
            c.Method1();
        }

        public void Method4()
        {
            Method3();
        }
    }

    class Class3
    {
        public void Method5()
        {
            Method6();
        }

        public void Method6()
        {
            Method7();
        }

        public void Method7()
        {
            var c = new Class2();
            c.Method4();
        }
    }

    class Class4
    {
        public void Method7()
        {
            var c = new Class3();
            c.Method5();
        }
    }
}
